From 6ef39682270685a078f292f1f2e02b0a90f9c399 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 18 Jul 2022 06:59:39 -0500 Subject: [PATCH] css: Fix handling of transform values When computing a transform value, there is nothing to do, but we still need to copy the matrix from src to dest, since it depends on the other transforms in the array whether we are using the src or the dest in the end. This fixes cases like -gtk-icon-transform: perspective(100px) matrix(1,2,...); which would otherwise end up with a zero matrix. --- gtk/gtkcsstransformvalue.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gtk/gtkcsstransformvalue.c b/gtk/gtkcsstransformvalue.c index 0b59cdee87..636fd553cf 100644 --- a/gtk/gtkcsstransformvalue.c +++ b/gtk/gtkcsstransformvalue.c @@ -287,6 +287,7 @@ gtk_css_transform_compute (GtkCssTransform *dest, switch (src->type) { case GTK_CSS_TRANSFORM_MATRIX: + memcpy (dest, src, sizeof (GtkCssTransform)); return TRUE; case GTK_CSS_TRANSFORM_TRANSLATE: dest->translate.x = _gtk_css_value_compute (src->translate.x, property_id, provider, style, parent_style); -- 2.30.2